﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ViewCamera.CApVCAlignCameraWithCurrentViewCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.ViewCamera.PrivateImplementationDetails;
using System;
using System.Resources;
using System.Windows.Forms;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Ui;


namespace DnProcessSimulateCommands.ViewCamera;

internal class CApVCAlignCameraWithCurrentViewCmd : TxButtonCommand
{
  private ITxCommandEnabler _enabler;

  public CApVCAlignCameraWithCurrentViewCmd()
  {
    this._enabler = (ITxCommandEnabler) new CApVCAlignCameraWithCurrentViewEnabler();
  }

  public virtual void Execute(object cmdParams)
  {
    try
    {
      CApVCUtil.AlignCameraWithCurrentView();
    }
    catch (Exception ex)
    {
      int num = (int) TxMessageBox.Show(ex.Message, new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("ALIGN_CAMERA_WITH_CURRENT_VIEW_NAME"), MessageBoxButtons.OK, MessageBoxIcon.Hand);
    }
  }

  public virtual string Category
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("CREATE_VIEW_CAMERA_CATEGORY");
    }
  }

  public virtual string Name
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("ALIGN_CAMERA_WITH_CURRENT_VIEW_NAME");
    }
  }

  public virtual ITxImage Image
  {
    get => (ITxImage) TxImageManager.GetImageByKey("AlignCameraWithCurrentView");
  }

  public virtual string Tooltip
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("ALIGN_CAMERA_WITH_CURRENT_VIEW_TOOLTIP");
    }
  }

  public virtual string Description
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("ALIGN_CAMERA_WITH_CURRENT_VIEW_DESCRIPTION");
    }
  }

  public virtual ITxCommandEnabler CommandEnabler => this._enabler;
}
